package com.lagou.ex.domain;

public class LgResult {
    private String code;
    private String msg;
    private Object data;

    public static LgResult build() {
        LgResult lgResult = new LgResult();
        lgResult.setCode("200");
        lgResult.setMsg("保存成功");
        lgResult.setData(null);
        return lgResult;
    }

    public static LgResult build(String code, String msg) {
        LgResult lgResult = new LgResult();
        lgResult.setCode(code);
        lgResult.setMsg(msg);
        lgResult.setData(null);
        return lgResult;
    }

    public static LgResult build(String code, String msg, Object data) {
        LgResult lgResult = new LgResult();
        lgResult.setCode(code);
        lgResult.setMsg(msg);
        lgResult.setData(data);
        return lgResult;
    }

    public static LgResult build(Object data) {
        LgResult lgResult = new LgResult();
        lgResult.setCode("200");
        lgResult.setMsg("保存成功");
        lgResult.setData(data);
        return lgResult;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
